package com.jay.io.clazz;

import java.io.FileDescriptor;
import java.io.FileInputStream;

public class FileDescriptorCls {
	public static void main(String[] args) {
		try {
			FileInputStream fi1 = new FileInputStream("out.txt");
			FileInputStream fi2 = new FileInputStream("out.txt");
			FileDescriptor fd1 = fi1.getFD();
			FileDescriptor fd2 = fi2.getFD();
			System.out.println("got " + fd1);
			System.out.println("got " + fd2);
			if (fd1 != null)
				System.out.println("valid " + fd1.valid());
			if (fd2 != null)
				System.out.println("valid " + fd2.valid());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
